package br.edu.ufcg.lsd.wbis.ui.client.ui.loggedin.admin.home.authorization;

import br.edu.ufcg.lsd.wbis.ui.client.ui.loggedin.util.Randomizer;

import com.google.gwt.user.client.rpc.AsyncCallback;

/**
 * @author Renato Miceli
 */
public class AuthorizationCallback implements AsyncCallback<Void> {

	private final Randomizer randomizer;

	public AuthorizationCallback(Randomizer rand) {

		this.randomizer = rand;
	}

	/**
	 * {@inheritDoc}
	 */
	public void onFailure(Throwable caught) {
		// Do nothing!
	}

	/**
	 * {@inheritDoc}
	 */
	public void onSuccess(Void result) {
		randomizer.randomize();
	}

}
